<?php
namespace app\serverqrcode\validate;

use \app\manage\validate\BaseValidate;
/**
 * Created by PhpStorm.
 * User: 97606
 * Date: 2017/6/16
 * Time: 17:42
 */
class QrCode extends BaseValidate
{
    protected $rule = [
        "token"   => ['alphaNum', 'length' => '32'],
        "appkey"  => ['alphaNum', 'length' => '32'],
        "type"    => ['require','number'],
        "code_id" => ['require'],
        "url"     => ['require','url'],
    ];

    protected $scene = [
        'add'  => ['token','appkey','type','code_id','url'],
        'gain' => ['token','appkey','type','code_id'],
    ];
}